#ifndef PELICANOR_H
#define PELICANOR_H

#include <QDialog>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QProgressBar>
#include <QComboBox>

#include "heartbeat.h"
#include "anydvdhandler.h"
#include "foldercopierthread.h"
#include "drivewatcher.h"
#include "discidentifier.h"
#include "mymovieapi.h"
#include "copierhandler.h"
#include "tcpconnection.h"
#include "settings.h"
#include "currentstatus.h"

class PelicanoR : public QDialog
{
    Q_OBJECT
public:
    explicit PelicanoR(QWidget *parent = 0);
    virtual ~PelicanoR();
    void start();
    
signals:
    
public slots:
    void fillDialog(QList<DiscData> discData);
    void setStartButtonEnabled();
    void stopCopyingDisc();
    void copyDisc(DiscData);
    void copyDisc();
    void setCopierDiscData(int index);
    void updateProgress(int progress);
    void sendProgress(int progress);
    void discDetected();
    void discEmpty();
    void discIdentified(QByteArray id);
    void reloadDisc();
    void copyDone(QString,QString, QString discId, bool parentalControl);
    void acceptConnection();
    void sendDiscData(QList<DiscData> discData);
    void sendMovieData(QList<MovieData> movieData);
    void titleIdUnknown();
    void movieUnknown();
    void SearchMovieData(MovieData movieData);
    void SearchTitleDiscData(DiscData movieData);
    void listenAction();
private:
    TcpConnection *_connection;
    QLabel *lblTitle;
    QLabel *lblStatus;
    QLineEdit * leTitle;
    QProgressBar *progressBar;
    QPushButton *quitButton;
    QPushButton *startButton;
    QComboBox *cmbRegions;

    CopierHandler *copierHandler;
    MyMovieApi *api;
    DriveWatcher *driveWatcher;
    DiscIdentifier *discIdentifier;
    QList<DiscData> _discDataList;
    AnydvdHandler *_anydvdHandler ;
    HeartBeat *_heartBeat;
    QTimer *_timerAction;
    QString _currentDisc;


    
};

#endif // PELICANOR_H
